<%@ Page Language="C#" MasterPageFile="~/Common/WebSiteMaster.master" AutoEventWireup="true" CodeBehind="C_UpdateProgress.aspx.cs" Inherits="ScottCateAjax2008.Lesson05.C_UpdateProgress" Title="Update Progress Feedback Control" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <div style="margin-bottom: 30px;">
        The UpdateProgress control has a default value of 500 milliseconds,<br />
        before it kicks in. This is for fast or short running rountrips to<br />
        the server. If the request takes more than 1/2 a second, the progress<br />
        control is displayed. This can be overridden with the<br />
        DisplayAfter attribute.
    </div>
    <asp:ScriptManager ID="SM1" runat="server"></asp:ScriptManager>
    
    <asp:UpdatePanel ID="UP1" UpdateMode="Conditional" runat="server">
        <ContentTemplate>
            <fieldset>
                <legend>Red Zone</legend>            
                Loaded at : <asp:Label ID="RefreshRedTimeLabel" runat="server" /><br />
                <asp:Button ID="Button1" Text="Refresh Page (0 Second Delay)" runat="server" OnClick="refreshButton_Click" /><br />
                <asp:Button ID="Button2" Text="Refresh Page (2 Second Delay)" runat="server" OnClick="refreshButton200_Click" /><br />
                <asp:Button ID="Button3" Text="Refresh Page (5 Second Delay)" runat="server" OnClick="refreshButton500_Click" /><br />
            </fieldset>
        </ContentTemplate>
    </asp:UpdatePanel>

    <br /><br />

    <asp:UpdatePanel ID="UP2" UpdateMode="Conditional" runat="server">
        <ContentTemplate>
            <fieldset>
                <legend>Blue Zone</legend>
                Loaded at : <asp:Label ID="RefreshBlueTimeLabel" runat="server" /><br />
                <asp:Button ID="Button4" Text="Refresh Page (0 Second Delay)" runat="server" OnClick="refreshButton_Click" /><br />
                <asp:Button ID="Button5" Text="Refresh Page (2 Second Delay)" runat="server" OnClick="refreshButton200_Click" /><br />
                <asp:Button ID="Button6" Text="Refresh Page (5 Second Delay)" runat="server" OnClick="refreshButton500_Click" /><br />
            </fieldset>
        </ContentTemplate>
    </asp:UpdatePanel>
    
    <asp:UpdateProgress ID="UpdateProgressRed" AssociatedUpdatePanelID="UP1"  runat="server">
        <ProgressTemplate>
            <span style="top:0px;left:0px;z-index:99;padding:30px;position:absolute;color:White;background-color: Red">Loading Red Zone.....</span>
        </ProgressTemplate>
    </asp:UpdateProgress>


    <asp:UpdateProgress ID="UpdateProgressBlue" AssociatedUpdatePanelID="UP2"  runat="server">
        <ProgressTemplate>
            <span style="top:0px;left:0px;z-index:99;padding:30px;position:absolute;color:White;background-color: Blue">Loading Blue Zone.....</span>
        </ProgressTemplate>
    </asp:UpdateProgress>

</asp:Content>
